Fix out-of-bound access. (#440918, Matthias Kilian)
authorBehdad Esfahbod <behdad@gnome.org>
Tue, 12 Jun 2007 05:40:13 +0000 (05:40 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Tue, 12 Jun 2007 05:40:13 +0000 (05:40 +0000)
2007-06-12  Behdad Esfahbod  <behdad@gnome.org>

        * io-pnm.c (explode_bitmap_into_buf): Fix out-of-bound access.
        (#440918, Matthias Kilian)

svn path=/trunk/; revision=18110

gdk-pixbuf/ChangeLog
gdk-pixbuf/io-pnm.c

index 6bb659fc8cf7943f5b20251292ab6dd79204f7c4..730a53379df4effdeb6ab14a1edf94a313890966 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-12  Behdad Esfahbod  <behdad@gnome.org>
+
+       * io-pnm.c (explode_bitmap_into_buf): Fix out-of-bound access.
+       (#440918, Matthias Kilian)
+
 2007-06-06  Matthias Clasen  <mclasen@redhat.com>
 
        * === Released 2.11.2 ===
index f9391ca0b4d114456ea9cf910f96080e07f10657..37f726b30c086c80353914118f34afd4de333da0 100644 (file)
@@ -133,7 +133,7 @@ explode_bitmap_into_buf (PnmLoaderContext *context)
                to -= 3;
                bit++;
                
-               if (bit > 7) {
+               if (bit > 7 && x > 0) {
                        from--;
                        data = from[0];
                        bit = 0;